<link rel="stylesheet" type="text/css" href="../addons/jy_bargain/css/style.css">
<link rel="stylesheet" type="text/css" href="../addons/jy_bargain/css/bargain.css?v=20191113">
<style>
.fui-navbar .cartbtn {padding-right:0.3rem;background:#fff;opacity:1}
.fui-navbar .buybtn  {padding-left:0.3rem;background:#fff}
.fee-tag-nav, .fee-tagup-nav, .fee-disabled-nav {border-radius:1rem;height:2rem;line-height:1.95rem;color:#fff;width:100%;font-weight:400;font-size:0.7rem;margin:0.2rem 0;padding:0 0.2rem}
.fee-tagup {background:linear-gradient(to right,rgba(129,2,138,1),rgba(238,2,253,1));color:#fff;width:auto;font-weight:400;font-size:0.55rem}
.fee-tag-nav {background:linear-gradient(to right,rgba(211,5,5,1),rgba(255,8,8,1));}
.fee-tagup-nav {background:linear-gradient(to right,rgba(129,2,138,1),rgba(190,0,205,1));}
.fee-disabled-nav {background:#bbb;color:#fff;}	
</style>
<div class='fui-page fui-page-current'>  
        <div class='fui-content'>
			<div id="carousel-container" ng-class="{'carousel slide':1,'margin-top0':pagedata.pluginset.issearch==1 || pagedata.isa2}" data-role="carousel" data-param-auto="true" ng-if="pagedata.res.images">
				<div class="carousel-inner" role="listbox">
					<div ng-repeat="pic in pagedata.res.images" ng-class="{'item':1, 'active':$index==0}" >
						<a ng-click="access_json(nav.url)">
							<img ng-src="{{tomedia(pic) || '../core/resource/images/nopic.jpg'}}" style="display: block; width: 100%; height: 100%;">
						</a>
					</div>
				</div>
				<style>
						.fui-swipe-page .fui-swipe-bullet {width:0.2rem;height:0.2rem;border-radius: 0.2rem;}
						.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;width:0.6rem;border-radius: 0.2rem;}
				</style>
				<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 0.2rem; bottom: 0.2rem; ">
					<div class="fui-swipe-bullet" ng-repeat="pic in pagedata.res.images" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
				</div>
			</div>
            <div class="lynn_goods_head">
                <div class="lynn-goods-head-top fui-list">                  
                    <div ng-if="pagedata.res.type==1" class="fui-list-inner">
                        底价：&yen;<strong>{{pagedata.res.end_price}}</strong> 原价：<del>{{pagedata.res.price}}</del>
                    </div>
                    <div ng-if="pagedata.res.type==0" class="fui-list-inner">
                        原价：&yen; <strong>{{pagedata.res.price}}</strong><span style="color:red"></span>
                    </div>
                    <div class="fui-list-media">
                        <i>{{pagedata.res.act_times}}人参与</i>
                    </div>
                </div>
                <div class="lynn-goods-head-title fui-list">
                    <div class="fui-list-inner">
                        <h2>{{pagedata.res.title}}</h2>
                        <p>{{pagedata.res.title2}}</p>
                    </div>
                    <div class="fui-list-media">
                        <a ng-click="pagedata.show_xieyi=true" data-nocache="true"><i class="icon icon-manageorder"></i><p>规则</p></a>
                    </div>
                </div>
                <div class="lynn-goods-head-user">
                    <div class="lynn-goods-head-user-top fui-list"></div>
                    <div class="detail-rule" style="padding:0.4rem">
                        <div class="detail-tule-top fui-list"  style="padding:0">
                            <div class="fui-list-inner"><i></i>砍价流程</div>

                        </div>
                        <div class="detail-tule-bot fui-list">
                            <div class="fui-list-inner active"><i>1</i><p><span>选择心仪商品</span></p></div>
                            <div class="fui-list-media"><i class="icon jinyunicon icon-more"></i></div>
                            <div class="fui-list-inner"><i>2</i><p><span>邀请好友砍价</span></p></div>
                            <div class="fui-list-media"><i class="icon jinyunicon icon-more"></i></div>
                            <div class="fui-list-inner"><i>3</i><p><span>砍到最低价后支付</span></p></div>
                        </div>
                    </div>
					 <div ng-if="pagedata.res.status!=2" class="detail-rule" style="padding:0.4rem">
                        <div class="detail-tule-top fui-list"  style="padding:0">
								<div class="fui-list-inner"><i></i>{{pagedata.res.status==0?'距离活动结束':'距离活动结束开始'}}</div>
								<div style="color:red">
								<div class="text timer" ng-init="tool.time_down(pagedata.res.end_timedown)">
									<span class="time-hour">{{pagedata.res.end_timedown.hour}}</span>&nbsp;:&nbsp;<span class="time-min">{{pagedata.res.end_timedown.minute}}</span>&nbsp;:&nbsp;<span class="time-sec">{{pagedata.res.end_timedown.second}}</span>
								</div>
								</div>
                        </div>
					 </div>
                <div class="detail-info content content-images">
                    <div class="detail-info-title" ><span >图文详情</span></div>
					<div class="content-block content-images" ng-bind-html="trust(pagedata.res.content)"></div>
                </div>
            </div>
        </div>
    </div>
        <div class="fui-navbar footer-nav bordert" style="z-index:10;padding:0;">
            <a ng-click="access_json('jy_bargain/index/')"  class="nav-item home-btn" data-nocache="true">
                <span class="icon jinyunicon icon-shouye"></span>
                <span class="label">首页</span>
            </a>
			<a ng-click="access_json('jy_bargain/act/')" class="nav-item home-btn">
                <span class="icon jinyunicon icon-wo1"></span>
                <span class="label">我的</span>
            </a>
            <a ng-click="access_json('jy_weishop/order.create//num=1&goodsid='+pagedata.res.goods_id)" class="nav-item lynn-bargain-a lynn-bargain-now-a btn" data-nocache="true">
			<div class="fee-tag-nav">
				原价购买
			</div>
			</a>      
            <a ng-if="pagedata.res.status==0" ng-click="access_json('jy_bargain/bargain/main/goods_id='+pagedata.res.id)" class="nav-item lynn-bargain-a lynn-bargain-share-a external btn buybtn">		
			<div class="fee-tagup-nav">
				立即砍价
			</div>
			</a>
            <a ng-if="pagedata.res.status==1" class="nav-item lynn-bargain-a lynn-bargain-now-a btn" style="color: #ccc">
			<div class="fee-disabled-nav">
			尚未开始
			</div>
			</a>
            <a ng-if="pagedata.res.status==2" href="" class="nav-item lynn-bargain-a lynn-bargain-now-a btn" style="color: #ccc">
			<div class="fee-disabled-nav">
			已经结束
			</div>
			</a>
            <a ng-if="pagedata.res.status==3" href="" class="nav-item lynn-bargain-a lynn-bargain-now-a btn" style="color: #ccc">
			<div class="fee-disabled-nav">
			库存不足
			</div>
			</a>          
        </div>
</div>
<div ng-if="pagedata.show_xieyi" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" ng-click="pagedata.show_xieyi=false"></i>
			<div class="content-images" style="padding:0.5rem;height:20rem; overflow-y:scroll;">
					<div class="title bold" style="font-size:0.8rem">活动规则/ <small>Read Ggree</small></div>
					<div class="text" style="padding-top:0.5rem;font-size:0.7rem" ng-bind-html="trust(pagedata.basic.rule)">
					</div>
			</div>
			<div class="modal-footer">
				<div ng-click="pagedata.show_xieyi=false;" class="mod-check" style="width: 100%; margin: 0;">我已阅读</div>
			</div>
		</div>
	</div>
</div>
<script>
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
</script>